package com.imesne.office.excel.read;

import com.imesne.office.excel.model.ExcelBook;
import com.imesne.office.excel.model.ExcelCell;
import com.imesne.office.excel.model.ExcelRow;
import com.imesne.office.excel.model.ExcelSheet;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;

/**
 * Created by liyd on 17/7/12.
 */
public abstract class AbstractExcelReadProcessor implements ExcelReadProcessor {

    /**
     * 停止 不包含自身
     */
    public static final int STOP_EXCLUSIVE = -1;

    /**
     * 停止包含自身
     */
    public static final int STOP_INCLUSIVE = 0;

    /**
     * 继续
     */
    public static final int CONTINUE = 1;

    public void processExcelBook(ExcelBook excelBook, Workbook workbook, byte[] excelBytes) {

    }

    public int processExcelSheet(ExcelSheet excelSheet, Sheet sheet, Workbook workbook, int sheetIndex) {
        return CONTINUE;
    }

    public int processExcelRow(ExcelRow excelRow, Row row, Workbook workbook, Sheet sheet, int sheetIndex, int rowIndex) {
        return CONTINUE;
    }

    public int processExcelCell(ExcelCell excelCell, Workbook workbook, Sheet sheet, int sheetIndex, Row row, int rowIndex, Cell cell, int cellIndex) {
        return CONTINUE;
    }
}
